<!DOCTYPE html><html><head>
      <title>&#x524D;&#x7AEF;&#x5DE5;&#x7A0B;&#x5E08;&#x7EB3;&#x7C73;&#x5B66;&#x4F4D;&#x6837;&#x5F0F;&#x6307;&#x5357; - CSS</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      
      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css">
      
      

      
      
      
      
      
      
      

      <style>
      /**
 * prism.js Github theme based on GitHub's theme.
 * @author Sam Clarke
 */
code[class*="language-"],
pre[class*="language-"] {
  color: #333;
  background: none;
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.4;

  -moz-tab-size: 8;
  -o-tab-size: 8;
  tab-size: 8;

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  padding: .8em;
  overflow: auto;
  /* border: 1px solid #ddd; */
  border-radius: 3px;
  /* background: #fff; */
  background: #f5f5f5;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
  background: #f5f5f5;
}

.token.comment,
.token.blockquote {
  color: #969896;
}

.token.cdata {
  color: #183691;
}

.token.doctype,
.token.punctuation,
.token.variable,
.token.macro.property {
  color: #333;
}

.token.operator,
.token.important,
.token.keyword,
.token.rule,
.token.builtin {
  color: #a71d5d;
}

.token.string,
.token.url,
.token.regex,
.token.attr-value {
  color: #183691;
}

.token.property,
.token.number,
.token.boolean,
.token.entity,
.token.atrule,
.token.constant,
.token.symbol,
.token.command,
.token.code {
  color: #0086b3;
}

.token.tag,
.token.selector,
.token.prolog {
  color: #63a35c;
}

.token.function,
.token.namespace,
.token.pseudo-element,
.token.class,
.token.class-name,
.token.pseudo-class,
.token.id,
.token.url-reference .token.variable,
.token.attr-name {
  color: #795da3;
}

.token.entity {
  cursor: help;
}

.token.title,
.token.title .token.punctuation {
  font-weight: bold;
  color: #1d3e81;
}

.token.list {
  color: #ed6a43;
}

.token.inserted {
  background-color: #eaffea;
  color: #55a532;
}

.token.deleted {
  background-color: #ffecec;
  color: #bd2c00;
}

.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}


/* JSON */
.language-json .token.property {
  color: #183691;
}

.language-markup .token.tag .token.punctuation {
  color: #333;
}

/* CSS */
code.language-css,
.language-css .token.function {
  color: #0086b3;
}

/* YAML */
.language-yaml .token.atrule {
  color: #63a35c;
}

code.language-yaml {
  color: #183691;
}

/* Ruby */
.language-ruby .token.function {
  color: #333;
}

/* Markdown */
.language-markdown .token.url {
  color: #795da3;
}

/* Makefile */
.language-makefile .token.symbol {
  color: #795da3;
}

.language-makefile .token.variable {
  color: #183691;
}

.language-makefile .token.builtin {
  color: #0086b3;
}

/* Bash */
.language-bash .token.keyword {
  color: #0086b3;
}

/* highlight */
pre[data-line] {
  position: relative;
  padding: 1em 0 1em 3em;
}
pre[data-line] .line-highlight-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  background-color: transparent;
  display: block;
  width: 100%;
}

pre[data-line] .line-highlight {
  position: absolute;
  left: 0;
  right: 0;
  padding: inherit 0;
  margin-top: 1em;
  background: hsla(24, 20%, 50%,.08);
  background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
  pointer-events: none;
  line-height: inherit;
  white-space: pre;
}

pre[data-line] .line-highlight:before, 
pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-start);
  position: absolute;
  top: .4em;
  left: .6em;
  min-width: 1em;
  padding: 0 .5em;
  background-color: hsla(24, 20%, 50%,.4);
  color: hsl(24, 20%, 95%);
  font: bold 65%/1.5 sans-serif;
  text-align: center;
  vertical-align: .3em;
  border-radius: 999px;
  text-shadow: none;
  box-shadow: 0 1px white;
}

pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-end);
  top: auto;
  bottom: .4em;
}html body{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ul,html body>ol{margin-bottom:16px}html body ul,html body ol{padding-left:2em}html body ul.no-list,html body ol.no-list{padding:0;list-style-type:none}html body ul ul,html body ul ol,html body ol ol,html body ol ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:bold;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em !important;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::before,html body code::after{letter-spacing:-0.2em;content:"\00a0"}html body pre>code{padding:0;margin:0;font-size:.85em !important;word-break:normal;white-space:pre;background:transparent;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;font-size:.85em !important;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:before,html body pre tt:before,html body pre code:after,html body pre tt:after{content:normal}html body p,html body blockquote,html body ul,html body ol,html body dl,html body pre{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body pre,html body code{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview .pagebreak,.markdown-preview .newpage{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center !important}.markdown-preview:not([for="preview"]) .code-chunk .btn-group{display:none}.markdown-preview:not([for="preview"]) .code-chunk .status{display:none}.markdown-preview:not([for="preview"]) .code-chunk .output-div{margin-bottom:16px}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0}@media screen and (min-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{font-size:14px !important;padding:1em}}@media print{html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,0.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{padding:0 1.6em;margin-top:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc li{margin-bottom:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{list-style-type:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% -  300px);padding:2em calc(50% - 457px -  150px);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
/* Please visit the URL below for more information: */
/*   https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */

      </style>
    </head>
    <body for="html-export">
      <div class="mume markdown-preview  ">
      <h1 class="mume-header" id="%E5%89%8D%E7%AB%AF%E5%B7%A5%E7%A8%8B%E5%B8%88%E7%BA%B3%E7%B1%B3%E5%AD%A6%E4%BD%8D%E6%A0%B7%E5%BC%8F%E6%8C%87%E5%8D%97-css">&#x524D;&#x7AEF;&#x5DE5;&#x7A0B;&#x5E08;&#x7EB3;&#x7C73;&#x5B66;&#x4F4D;&#x6837;&#x5F0F;&#x6307;&#x5357; - CSS</h1>

<p>&#x70B9;&#x6B64;&#x67E5;&#x770B;&#x6587;&#x6863;&#x82F1;&#x6587;&#x7248;&#xFF08;<a href="https://s3.cn-north-1.amazonaws.com.cn/static-documents/nd001/Udacity+Nanodegree+Style+Guide_JavaScript_EN.pdf">pdf</a>&#xFF0C;<a href="http://udacity.github.io/frontend-nanodegree-styleguide/javascript.html">GitHub.io</a>&#xFF09;</p>
<h2 class="mume-header" id="%E9%9B%B6-%E7%AE%80%E4%BB%8B">&#x96F6;. &#x7B80;&#x4ECB;</h2>

<p>&#x8BE5;&#x6307;&#x5357;&#x662F;&#x4F60;&#x5728;&#x9879;&#x76EE;&#x8FDB;&#x884C;&#x8FC7;&#x7A0B;&#x4E2D;&#x6240;&#x9700;&#x9075;&#x5B88;&#x7684;&#x5B98;&#x65B9;&#x6307;&#x5357;&#x3002;&#x4F18;&#x8FBE;&#x5B66;&#x57CE;&#x7684;&#x8BC4;&#x4F30;&#x4EBA;&#x5458;&#x4F1A;&#x6839;&#x636E;&#x8BE5;&#x6307;&#x5357;&#x4E3A;&#x4F60;&#x7684;&#x9879;&#x76EE;&#x6253;&#x5206;&#x3002;&#x5728;&#x524D;&#x7AEF;&#x7F51;&#x9875;&#x5F00;&#x53D1;&#x7684;&#x4E16;&#x754C;&#x4E2D;&#xFF0C;&#x6709;&#x5F88;&quot;&#x6700;&#x4F73;&quot;&#x6837;&#x5F0F;&#x4F9B;&#x4F60;&#x9009;&#x62E9;&#x3002;&#x56E0;&#x6B64;&#xFF0C;&#x4E3A;&#x4E86;&#x51CF;&#x5C11;&#x5B66;&#x751F;&#x5728;&#x9879;&#x76EE;&#x8FC7;&#x7A0B;&#x4E2D;&#x56E0;&#x9009;&#x62E9;&#x4F55;&#x79CD;&#x6837;&#x5F0F;&#x6240;&#x4EA7;&#x751F;&#x7684;&#x56F0;&#x60D1;&#xFF0C;&#x6211;&#x4EEC;&#x5F3A;&#x70C8;&#x5EFA;&#x8BAE;&#x6240;&#x6709;&#x5B66;&#x751F;&#x5728;&#x5176;&#x9879;&#x76EE;&#x4E2D;&#x9075;&#x5FAA;&#x8FD9;&#x4E2A;&#x6837;&#x5F0F;&#x6307;&#x5357;&#x3002;</p>
<h2 class="mume-header" id="%E4%B8%80-%E9%80%9A%E7%94%A8%E8%A7%84%E5%88%99">&#x4E00;. &#x901A;&#x7528;&#x89C4;&#x5219;</h2>

<h3 class="mume-header" id="11-%E7%BC%96%E7%A0%81">1.1 &#x7F16;&#x7801;</h3>

<p>&#x4F7F;&#x7528; UTF-8 &#x3002;</p>
<p>&#x786E;&#x4FDD;&#x4F60;&#x7684;&#x7F16;&#x8F91;&#x5668;&#x5C06;&#x6CA1;&#x6709;&#x5B57;&#x8282;&#x987A;&#x5E8F;&#x6807;&#x8BB0;&#x7684; UTF-8 &#x7528;&#x4F5C;&#x5B57;&#x7B26;&#x7F16;&#x7801;&#x3002;</p>
<h3 class="mume-header" id="12-%E5%AD%97%E6%AF%8D%E5%A4%A7%E5%B0%8F%E5%86%99">1.2 &#x5B57;&#x6BCD;&#x5927;&#x5C0F;&#x5199;</h3>

<p>&#x4EC5;&#x4F7F;&#x7528;&#x5C0F;&#x5199;&#x3002;</p>
<p>&#x6240;&#x6709;&#x4EE3;&#x7801;&#x5747;&#x4F7F;&#x7528;&#x5C0F;&#x5199;&#xFF0C;&#x8BE5;&#x89C4;&#x5219;&#x9002;&#x7528;&#x4E8E; CSS &#x9009;&#x62E9;&#x7B26;&#x3001;&#x5C5E;&#x6027;&#x548C;&#x5C5E;&#x6027;&#x503C;&#xFF08;&#x5B57;&#x7B26;&#x4E32;&#x9664;&#x5916;&#xFF09;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">color</span><span class="token punctuation">:</span> #E5E5E5<span class="token punctuation">;</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">color</span><span class="token punctuation">:</span> #e5e5e5<span class="token punctuation">;</span>
</pre><h3 class="mume-header" id="13-%E6%9C%AB%E5%B0%BE%E7%A9%BA%E6%A0%BC">1.3 &#x672B;&#x5C3E;&#x7A7A;&#x683C;</h3>

<p>&#x5220;&#x9664;&#x884C;&#x5C3E;&#x7A7A;&#x683C;&#x3002;</p>
<p>&#x884C;&#x5C3E;&#x7A7A;&#x683C;&#x5C5E;&#x4E8E;&#x591A;&#x4F59;&#x7684;&#x7B26;&#x53F7;&#xFF0C;&#x5E76;&#x4E14;&#x4F1A;&#x8BA9; diff &#x53D8;&#x5F97;&#x66F4;&#x52A0;&#x590D;&#x6742;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">border</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>__
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">border</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
</pre><p>&#x5982;&#x679C;&#x4F60;&#x4F7F;&#x7528; VS Code&#xFF0C;&#x4F60;&#x53EF;&#x8FDB;&#x5165;&#x7F16;&#x8F91;&#x5668;&#x83DC;&#x5355;&#x7684;&#x300C;&#x9996;&#x9009;&#x9879;&#x2014;&#x2014;&gt;&#x8BBE;&#x7F6E;&#x300D;&#x4E2D;&#x641C;&#x7D22; <code>files.trimTrailingWhitespace</code> &#xFF0C;&#x7136;&#x540E;&#x5C06;&#x9009;&#x9879;&#x52FE;&#x9009;&#x5373;&#x53EF;&#xFF0C;&#x8FD9;&#x6837;&#x6BCF;&#x5F53;&#x4F60;&#x4FDD;&#x5B58;&#x6587;&#x4EF6;&#x65F6;&#xFF0C;&#x53BB;&#x9664;&#x884C;&#x5C3E;&#x7A7A;&#x683C;&#x64CD;&#x4F5C;&#x4FBF;&#x4F1A;&#x81EA;&#x52A8;&#x5B8C;&#x6210;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="json" class="language-json"><span class="token property">&quot;files.trimTrailingWhitespace&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span>
</pre><h3 class="mume-header" id="14-%E7%BC%A9%E8%BF%9B">1.4 &#x7F29;&#x8FDB;</h3>

<p>&#x6574;&#x4E2A;&#x6587;&#x4EF6;&#x4E2D;&#x7684;&#x7F29;&#x8FDB;&#x5E94;&#x4FDD;&#x6301;&#x524D;&#x540E;&#x4E00;&#x81F4;&#xFF0C;&#x4F7F;&#x7528; Tab&#x3001;2&#x4E2A;&#x7A7A;&#x683C;&#x6216;4&#x4E2A;&#x7A7A;&#x683C;&#x90FD;&#x53EF;&#x4EE5;&#xFF0C;&#x4F46;&#x9700;&#x4FDD;&#x6301;&#x524D;&#x540E;&#x4E00;&#x81F4;&#x3002;</p>
<h3 class="mume-header" id="15-%E6%B3%A8%E9%87%8A">1.5 &#x6CE8;&#x91CA;</h3>

<p>&#x5728;&#x53EF;&#x884C;&#x548C;&#x5FC5;&#x8981;&#x65F6;&#xFF0C;&#x5BF9;&#x4EE3;&#x7801;&#x6DFB;&#x52A0;&#x6CE8;&#x91CA;&#x3002;</p>
<p>&#x7528;&#x6CE8;&#x91CA;&#x89E3;&#x91CA;&#x4EE3;&#x7801;&#x7684;&#x8986;&#x76D6;&#x8303;&#x56F4;&#x3001;&#x76EE;&#x7684;&#x548C;&#x4F5C;&#x7528;&#x4EE5;&#x53CA;&#x4F7F;&#x7528;&#x548C;&#x9009;&#x62E9;&#x5404;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#x7684;&#x539F;&#x56E0;&#x3002;</p>
<h3 class="mume-header" id="16-%E5%8C%BA%E5%9D%97%E6%B3%A8%E9%87%8A">1.6 &#x533A;&#x5757;&#x6CE8;&#x91CA;</h3>

<p>&#x5728;&#x53EF;&#x884C;&#x65F6;&#xFF0C;&#x7528;&#x6CE8;&#x91CA;&#x5C06;&#x6837;&#x5F0F;&#x8868;&#x533A;&#x5757;&#x7EC4;&#x5408;&#x5728;&#x4E00;&#x8D77;&#xFF0C;&#x7528;&#x65B0;&#x884C;&#x5206;&#x9694;&#x5404;&#x533A;&#x5757;&#x3002;</p>
<p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token comment">/* Header */</span>
<span class="token selector">.header</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token selector">.header-nav</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token comment">/* Content */</span>
<span class="token selector">.gallery</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token selector">.gallery-img</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token comment">/* Footer */</span>
<span class="token selector">.footer</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token selector">.footer-nav</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="17-%E5%BE%85%E5%8A%9E%E4%BB%BB%E5%8A%A1">1.7 &#x5F85;&#x529E;&#x4EFB;&#x52A1;</h3>

<p>&#x7528; <code>TODO:</code> &#x6807;&#x6CE8;&#x5F85;&#x529E;&#x4E8B;&#x9879;&#x548C;&#x4EFB;&#x52A1;&#x9879;&#xFF1A;</p>
<p>&#x4EC5;&#x7528;&#x5173;&#x952E;&#x8BCD; <code>TODO</code> &#x6807;&#x6CE8;&#x5F85;&#x529E;&#x4E8B;&#x9879;&#xFF0C;&#x4E0D;&#x8981;&#x4F7F;&#x7528; <code>@@</code> &#x7B49;&#x5176;&#x4ED6;&#x683C;&#x5F0F;&#x7684;&#x5B57;&#x6837;&#x3002;&#x5728;&#x4EFB;&#x52A1;&#x9879;&#x524D;&#x52A0;&#x5192;&#x53F7;&#xFF0C;&#x5982;&#xFF1A;<code>TODO: &#x5F85;&#x529E;&#x4EFB;&#x52A1;</code> &#x3002;</p>
<p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token comment">/* TODO: &#x6DFB;&#x52A0;&#x4E00;&#x4E2A;&#x6309;&#x94AE;&#x5143;&#x7D20; */</span>
</pre><h2 class="mume-header" id="%E4%BA%8C-css-%E6%A0%B7%E5%BC%8F%E8%A7%84%E5%88%99">&#x4E8C;. CSS &#x6837;&#x5F0F;&#x89C4;&#x5219;</h2>

<h3 class="mume-header" id="21-id-%E5%92%8C-class-%E5%90%8D%E7%A7%B0">2.1 ID &#x548C; CLASS &#x540D;&#x79F0;</h3>

<p>&#x4F7F;&#x7528;&#x6709;&#x610F;&#x4E49;&#x6216;&#x5177;&#x6709;&#x666E;&#x904D;&#x6027;&#x7684; ID &#x548C;&#x7C7B;&#x540D;&#x79F0;&#x3002;</p>
<p>&#x4E0D;&#x53EF;&#x4F7F;&#x7528;&#x610F;&#x4E49;&#x542B;&#x7CCA;&#x7684; ID &#x548C;&#x7C7B;&#x540D;&#x79F0;&#xFF0C;&#x4F7F;&#x7528;&#x80FD;&#x591F;&#x53CD;&#x6620;&#x76F8;&#x5E94;&#x5143;&#x7D20;&#x610F;&#x4E49;&#x7684;&#x540D;&#x79F0;&#x6216;&#x5177;&#x6709;&#x666E;&#x904D;&#x6027;&#x7684;&#x901A;&#x7528;&#x540D;&#x3002;</p>
<p>&#x6700;&#x597D;&#x4F7F;&#x7528;&#x80FD;&#x591F;&#x53CD;&#x6620;&#x76F8;&#x5E94;&#x5143;&#x7D20;&#x610F;&#x4E49;&#x7684;&#x5177;&#x4F53;&#x540D;&#x79F0;&#xFF0C;&#x56E0;&#x4E3A;&#x8FD9;&#x4E9B;&#x540D;&#x79F0;&#x6700;&#x6613;&#x4E8E;&#x7406;&#x89E3;&#x4E14;&#x4E0D;&#x6613;&#x53D8;&#x66F4;&#x3002;</p>
<p>&#x5177;&#x6709;&#x666E;&#x904D;&#x6027;&#x7684;&#x901A;&#x7528;&#x540D;&#x88AB;&#x7528;&#x4E8E;&#x4E0E;&#x7C7B;&#x4F3C;&#x5143;&#x7D20;&#x610F;&#x4E49;&#x76F8;&#x4EFF;&#x7684;&#x5143;&#x7D20;&#xFF0C;&#x4E3B;&#x8981;&#x8D77;&#x8F85;&#x52A9;&#x4F5C;&#x7528;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">.p-998</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token selector">.btn-green</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>
</pre><p>&#x63A8;&#x8350;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">.gallery</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token selector">.btn-default</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="22-%E7%B1%BB%E5%9E%8B%E9%80%89%E6%8B%A9%E7%AC%A6">2.2 &#x7C7B;&#x578B;&#x9009;&#x62E9;&#x7B26;</h3>

<p>&#x907F;&#x514D;&#x7528;&#x7C7B;&#x578B;&#x9009;&#x62E9;&#x5668;&#x9650;&#x5B9A; ID &#x548C;&#x7C7B;&#x540D;&#x79F0;&#x3002;</p>
<p>&#x9664;&#x975E;&#x60C5;&#x51B5;&#x9700;&#x8981;&#xFF08;&#x4F8B;&#x5982;&#xFF0C;&#x5728;&#x8F85;&#x52A9;&#x7C7B;&#x578B;&#x4E2D;&#xFF09;&#xFF0C;&#x5426;&#x5219;&#x4E0D;&#x8981;&#x5C06;&#x5143;&#x7D20;&#x540D;&#x548C; ID &#x6216;&#x7C7B;&#x540D;&#x79F0;&#x540C;&#x65F6;&#x4F7F;&#x7528;&#x3002;&#x4E3A;&#x63D0;&#x9AD8;&#x6027;&#x80FD;&#xFF0C;&#x907F;&#x514D;&#x4F7F;&#x7528;&#x4E0D;&#x5FC5;&#x8981;&#x7684;&#x7956;&#x5148;&#x9009;&#x62E9;&#x7B26;&#x3002;</p>
<p>&#x5728; CSS &#x6587;&#x4EF6;&#x4E2D;&#x4F7F;&#x7528; ID &#x4E5F;&#x662F;&#x8F83;&#x7CDF;&#x7CD5;&#x7684;&#x505A;&#x6CD5;&#xFF0C;&#x7C7B;&#x522B;&#x59CB;&#x7EC8;&#x6BD4;&#x540D;&#x79F0;&#x66F4;&#x5177;&#x4F18;&#x52BF;&#xFF0C;&#x5982;&#x679C;&#x4F60;&#x9700;&#x8981;&#x7ED9;&#x4E88;&#x67D0;&#x5143;&#x7D20;&#x4E00;&#x4E2A;&#x7279;&#x6B8A;&#x7684;&#x540D;&#x79F0;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528;&#x7C7B;&#x522B;&#x3002;&#xFF08; ID &#x7684;&#x552F;&#x4E00;&#x4F18;&#x70B9;&#x662F;&#x5728;&#x5B58;&#x5728;&#x6570;&#x5343;&#x4E2A;&#x7C7B;&#x4F3C;&#x5143;&#x7D20;&#x7684;&#x9875;&#x9762;&#x4E0A;&#x80FD;&#x4FDD;&#x6301;&#x8F83;&#x5FEB;&#x7684;&#x8FD0;&#x884C;&#x901F;&#x5EA6;&#x3002;&#xFF09;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">ul#example</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token selector">div.error</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">.example</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token selector">.error</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="23-%E7%AE%80%E5%86%99%E5%B1%9E%E6%80%A7">2.3 &#x7B80;&#x5199;&#x5C5E;&#x6027;</h3>

<p>&#x5E94;&#x4F7F;&#x7528;&#x7B80;&#x5199;&#x3002;</p>
<p>CSS &#x53EF;&#x63D0;&#x4F9B;&#x591A;&#x79CD;&#x7B80;&#x5199;&#x5C5E;&#x6027;&#xFF08;&#x4F8B;&#x5982;&#xFF0C;padding&#xFF0C;&#x800C;&#x4E0D;&#x662F; padding-top&#x3001;padding-bottom &#x7B49;&#xFF09;&#xFF0C;&#x5E94;&#x5C3D;&#x53EF;&#x80FD;&#x4F7F;&#x7528;&#x8FD9;&#x4E9B;&#x7B80;&#x5199;&#xFF0C;&#x4F46;&#x5B57;&#x4F53;&#x5C5E;&#x6027;&#x548C;&#x5728; Bootstrap &#x7B49;&#x6846;&#x67B6;&#x4E2D;&#x4F1A;&#x8986;&#x76D6;&#x5176;&#x4ED6;&#x540C;&#x540D;&#x5C5E;&#x6027;&#x7684;&#x5C5E;&#x6027;&#x9664;&#x5916;&#x3002;</p>
<p>&#x4F7F;&#x7528;&#x7B80;&#x5199;&#x5C5E;&#x6027;&#x6709;&#x52A9;&#x4E8E;&#x63D0;&#x9AD8;&#x4EE3;&#x7801;&#x7684;&#x6548;&#x7387;&#x548C;&#x6613;&#x61C2;&#x6027;&#x3002;&#x63A8;&#x8350;&#x5728;&#x8BBE;&#x7F6E;&#x4EC5;&#x4E0E;&#x5B57;&#x4F53; font &#x76F8;&#x5173;&#x7684;&#x5C5E;&#x6027;&#x65F6;&#x4F7F;&#x7528;&#x5B57;&#x4F53;&#x7B80;&#x5199;&#x5C5E;&#x6027;&#xFF0C;&#x4F46;&#x65E0;&#x9700;&#x5728;&#x8FDB;&#x884C;&#x5C0F;&#x5E45;&#x6539;&#x52A8;&#x65F6;&#x4F7F;&#x7528;&#x3002;&#x5728;&#x4F7F;&#x7528;&#x5B57;&#x4F53;&#x7B80;&#x5199;&#x5C5E;&#x6027;&#x65F6;&#xFF0C;&#x8BF7;&#x6CE8;&#x610F;&#xFF0C;&#x5982;&#x679C;&#x672A;&#x6CE8;&#x660E;&#x5B57;&#x4F53;&#x7684;&#x5927;&#x5C0F;&#x548C;&#x7CFB;&#x5217;&#xFF0C;&#x6D4F;&#x89C8;&#x5668;&#x4F1A;&#x5FFD;&#x7565;&#x6574;&#x4E2A;&#x5B57;&#x4F53;&#x58F0;&#x660E;&#x3002;</p>
<p>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">border-top-style</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span>
<span class="token property">font-family</span><span class="token punctuation">:</span> palatino, georgia, serif<span class="token punctuation">;</span>
<span class="token property">font-size</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
<span class="token property">line-height</span><span class="token punctuation">:</span> 1.6<span class="token punctuation">;</span>
<span class="token property">padding-bottom</span><span class="token punctuation">:</span> 2em<span class="token punctuation">;</span>
<span class="token property">padding-left</span><span class="token punctuation">:</span> 1em<span class="token punctuation">;</span>
<span class="token property">padding-right</span><span class="token punctuation">:</span> 1em<span class="token punctuation">;</span>
<span class="token property">padding-top</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">border-top</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
<span class="token property">font</span><span class="token punctuation">:</span> 100%/1.6 palatino, georgia, serif<span class="token punctuation">;</span>
<span class="token property">padding</span><span class="token punctuation">:</span> 0 1em 2em<span class="token punctuation">;</span>
</pre><h3 class="mume-header" id="24-%E7%9C%81%E7%95%A50%E5%90%8E%E9%9D%A2%E7%9A%84%E5%8D%95%E4%BD%8D">2.4 &#x7701;&#x7565;0&#x540E;&#x9762;&#x7684;&#x5355;&#x4F4D;</h3>

<p>&#x53BB;&#x6389; <code>0</code> &#x503C;&#x540E;&#x9762;&#x7684;&#x5355;&#x4F4D;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">margin</span><span class="token punctuation">:</span> 0em<span class="token punctuation">;</span>
<span class="token property">padding</span><span class="token punctuation">:</span> 0px<span class="token punctuation">;</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">margin</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
<span class="token property">padding</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
</pre><h3 class="mume-header" id="25-%E5%89%8D%E5%AF%BC%E9%9B%B6">2.5 &#x524D;&#x5BFC;&#x96F6;</h3>

<p>&#x4E3A;&#x65B9;&#x4FBF;&#x9605;&#x8BFB;&#xFF0C;&#x5341;&#x8FDB;&#x5236;&#x503C;&#x4E2D;&#x542B;&#x6709;&#x524D;&#x5BFC;&#x96F6;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">font-size</span><span class="token punctuation">:</span> .8em<span class="token punctuation">;</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">font-size</span><span class="token punctuation">:</span> 0.8em<span class="token punctuation">;</span>
</pre><h3 class="mume-header" id="26-%E5%8D%81%E5%85%AD%E8%BF%9B%E5%88%B6%E8%A1%A8%E7%A4%BA%E6%B3%95">2.6 &#x5341;&#x516D;&#x8FDB;&#x5236;&#x8868;&#x793A;&#x6CD5;</h3>

<p>&#x5728;&#x53EF;&#x884C;&#x65F6;&#xFF0C;&#x4F7F;&#x7528;&#x4E09;&#x4E2A;&#x5341;&#x516D;&#x8FDB;&#x5236;&#x8868;&#x793A;&#x6CD5;&#x7684;&#x5B57;&#x7B26;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">color</span><span class="token punctuation">:</span> #eebbcc<span class="token punctuation">;</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">color</span><span class="token punctuation">:</span> #ebc<span class="token punctuation">;</span>
</pre><h3 class="mume-header" id="27-id-%E5%92%8C-class-%E5%90%8D%E7%A7%B0%E5%88%86%E9%9A%94%E7%AC%A6">2.7 ID &#x548C; CLASS &#x540D;&#x79F0;&#x5206;&#x9694;&#x7B26;</h3>

<p>&#x7528;&#x8FDE;&#x5B57;&#x7B26;&#x5206;&#x9694; ID &#x548C;&#x7C7B;&#x540D;&#x79F0;&#x4E2D;&#x7684;&#x5B57;&#x8BCD; <code>-</code>&#x3002;</p>
<p>&#x7528;&#x8FDE;&#x5B57;&#x7B26;&#x8FDE;&#x63A5;&#x9009;&#x62E9;&#x7B26;&#x4E2D;&#x7684;&#x8BCD;&#x8BED;&#x548C;&#x7F29;&#x7565;&#x8BCD;&#xFF0C;&#x4EE5;&#x65B9;&#x4FBF;&#x7406;&#x89E3;&#x548C;&#x626B;&#x63CF;&#x3002;</p>
<p>&#x552F;&#x4E00;&#x7684;&#x4F8B;&#x5916;&#xFF1A;&#x5728;&#x7F16;&#x5199; <a href="http://getbem.com/naming/">BEM</a> &#x6837;&#x5F0F; CSS &#x9009;&#x62E9;&#x7B26;&#x65F6;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x4E0B;&#x5212;&#x7EBF; <code>_</code> &#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">.demoimage</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token selector">.errorStatus</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">.demo-image</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>

<span class="token selector">.error-status</span> <span class="token punctuation">{</span>
   &#x2026;
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="28-hack">2.8 Hack</h3>

<p>&#x907F;&#x514D;&#x7528;&#x6237;&#x4EE3;&#x7406;&#x68C0;&#x6D4B;&#x6216; CSS Hack &#x2014;&#x2014;&#x5C1D;&#x8BD5;&#x53E6;&#x4E00;&#x79CD;&#x65B9;&#x6CD5;&#x3002;</p>
<p>&#x4EBA;&#x4EEC;&#x53EF;&#x80FD;&#x5F88;&#x60F3;&#x5904;&#x7406;&#x7528;&#x6237;&#x4EE3;&#x7406;&#x68C0;&#x6D4B;&#x6216;&#x7279;&#x6B8A;&#x7684; CSS &#x8FC7;&#x6EE4;&#x5668;&#x4EE5;&#x53CA;&#x5E94;&#x53D8;&#x65B9;&#x6848;&#x548C;&#x975E;&#x6CD5;&#x5165;&#x4FB5;&#x4E4B;&#x95F4;&#x7684;&#x6837;&#x5F0F;&#x5DEE;&#x5F02;&#x3002;&#x8FD9;&#x4E24;&#x9879;&#x63AA;&#x65BD;&#x5747;&#x4E3A;&#x5B9E;&#x73B0;&#x548C;&#x7EF4;&#x62A4;&#x6709;&#x6548;&#x548C;&#x53EF;&#x5904;&#x7406;&#x7684;&#x4EE3;&#x7801;&#x5E93;&#x7684;&#x6700;&#x540E;&#x65B9;&#x6848;&#x3002;&#x8BF7;&#x8003;&#x8651;&#x8BE5;&#x6837;&#x5F0F;&#x662F;&#x5426;&#x5BF9;&#x5E94;&#x7528;&#x7684;&#x6027;&#x80FD;&#x81F3;&#x5173;&#x91CD;&#x8981;&#xFF0C;&#x9700;&#x8981;&#x8BE5;&#x6837;&#x5F0F;&#x7684;&#x7528;&#x6237;&#x4EE3;&#x7406;&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x4E0D;&#x91C7;&#x6837;&#x8BE5;&#x6837;&#x5F0F;&#x3002;</p>
<h2 class="mume-header" id="%E4%B8%89-css-%E6%A0%BC%E5%BC%8F%E8%A7%84%E5%88%99">&#x4E09;. CSS &#x683C;&#x5F0F;&#x89C4;&#x5219;</h2>

<h3 class="mume-header" id="31-%E4%BB%A3%E7%A0%81%E5%9D%97%E5%86%85%E5%AE%B9%E7%BC%A9%E8%BF%9B">3.1 &#x4EE3;&#x7801;&#x5757;&#x5185;&#x5BB9;&#x7F29;&#x8FDB;</h3>

<p>&#x7F29;&#x8FDB;&#x6240;&#x6709;&#x4EE3;&#x7801;&#x5757;&#x5185;&#x5BB9;&#xFF0C;&#x5373;&#x89C4;&#x5219;&#x5185;&#x7684;&#x89C4;&#x5219;&#x548C;&#x58F0;&#x660E;&#xFF0C;&#x4EE5;&#x53CD;&#x6620;&#x5C42;&#x6B21;&#x7ED3;&#x6784;&#x3001;&#x65B9;&#x4FBF;&#x7406;&#x89E3;&#x3002;</p>
<p>&#x63A8;&#x8350;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token atrule"><span class="token rule">@media</span> screen, projection</span> <span class="token punctuation">{</span>
   <span class="token selector">html</span> <span class="token punctuation">{</span>
      <span class="token property">background</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span>
      <span class="token property">color</span><span class="token punctuation">:</span> #444<span class="token punctuation">;</span>
   <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="32-%E5%A3%B0%E6%98%8E%E6%A0%87%E7%82%B9">3.2 &#x58F0;&#x660E;&#x6807;&#x70B9;</h3>

<p>&#x5728;&#x6240;&#x6709;&#x58F0;&#x660E;&#x540E;&#x4F7F;&#x7528;&#x5206;&#x53F7;&#xFF0C;&#x4EE5;&#x589E;&#x52A0;&#x8FDE;&#x8D2F;&#x6027;&#x548C;&#x5EF6;&#x5C55;&#x6027;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">.test</span> <span class="token punctuation">{</span>
   <span class="token property">display</span><span class="token punctuation">:</span> block<span class="token punctuation">;</span>
   <span class="token property">height</span><span class="token punctuation">:</span> 100px
<span class="token punctuation">}</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">.test</span> <span class="token punctuation">{</span>
   <span class="token property">display</span><span class="token punctuation">:</span> block<span class="token punctuation">;</span>
   <span class="token property">height</span><span class="token punctuation">:</span> 100px<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="33-%E5%B1%9E%E6%80%A7%E5%90%8D%E6%A0%87%E7%82%B9">3.3 &#x5C5E;&#x6027;&#x540D;&#x6807;&#x70B9;</h3>

<p>&#x6240;&#x6709;&#x5C5E;&#x6027;&#x540D;&#x5192;&#x53F7;&#x540E;&#x5747;&#x9700;&#x6DFB;&#x52A0;&#x7A7A;&#x683C;&#xFF0C;&#x4F46;&#x5C5E;&#x6027;&#x548C;&#x5192;&#x53F7;&#x95F4;&#x4E0D;&#x52A0;&#x7A7A;&#x683C;&#xFF0C;&#x4EE5;&#x589E;&#x52A0;&#x8FDE;&#x8D2F;&#x6027;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">font-weight</span><span class="token punctuation">:</span>bold<span class="token punctuation">;</span>
<span class="token property">padding</span> <span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
<span class="token property">margin</span> <span class="token punctuation">:</span>0<span class="token punctuation">;</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token property">font-weight</span><span class="token punctuation">:</span> bold<span class="token punctuation">;</span>
<span class="token property">padding</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
<span class="token property">margin</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
</pre><h3 class="mume-header" id="34-%E5%A3%B0%E6%98%8E%E5%8C%BA%E6%A0%87%E7%82%B9">3.4 &#x58F0;&#x660E;&#x533A;&#x6807;&#x70B9;</h3>

<p>&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x9009;&#x62E9;&#x7B26;&#x548C;&#x58F0;&#x660E;&#x533A;&#x8D77;&#x59CB;&#x5904;&#x7684;&#x5DE6;&#x5927;&#x62EC;&#x53F7;&#x4E4B;&#x95F4;&#x9700;&#x52A0;&#x7A7A;&#x683C;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">.video-block</span><span class="token punctuation">{</span>
   <span class="token property">margin</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.audio-block</span><span class="token punctuation">{</span>
   <span class="token property">margin</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">.video-block</span> <span class="token punctuation">{</span>
   <span class="token property">margin</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.audio-block</span> <span class="token punctuation">{</span>
   <span class="token property">margin</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="35-%E9%80%89%E6%8B%A9%E7%AC%A6%E5%92%8C%E5%A3%B0%E6%98%8E%E5%88%86%E9%9A%94">3.5 &#x9009;&#x62E9;&#x7B26;&#x548C;&#x58F0;&#x660E;&#x5206;&#x9694;</h3>

<p>&#x6240;&#x6709;&#x9009;&#x62E9;&#x7B26;&#x548C;&#x58F0;&#x660E;&#x5747;&#x9700;&#x53E6;&#x8D77;&#x4E00;&#x884C;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">h1, h2, h3</span> <span class="token punctuation">{</span>
   <span class="token property">font-weight</span><span class="token punctuation">:</span> normal<span class="token punctuation">;</span>
   <span class="token property">line-height</span><span class="token punctuation">:</span> 1.2<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">h1,
h2,
h3</span> <span class="token punctuation">{</span>
   <span class="token property">font-weight</span><span class="token punctuation">:</span> normal<span class="token punctuation">;</span>
   <span class="token property">line-height</span><span class="token punctuation">:</span> 1.2<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="36-%E8%A7%84%E5%88%99%E5%88%86%E9%9A%94">3.6 &#x89C4;&#x5219;&#x5206;&#x9694;</h3>

<p>&#x6240;&#x6709;&#x89C4;&#x5219;&#x95F4;&#x5747;&#x9700;&#x52A0;&#x4E00;&#x4E2A;&#x7A7A;&#x884C;&#xFF08;&#x4E24;&#x4E2A;&#x6362;&#x884C;&#x7B26;&#xFF09;&#x3002;</p>
<p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">html</span> <span class="token punctuation">{</span>
   <span class="token property">background</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">body</span> <span class="token punctuation">{</span>
   <span class="token property">margin</span><span class="token punctuation">:</span> auto<span class="token punctuation">;</span>
   <span class="token property">width</span><span class="token punctuation">:</span> 50%<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="37-css-%E5%BC%95%E5%8F%B7">3.7 CSS &#x5F15;&#x53F7;</h3>

<p>&#x5C5E;&#x6027;&#x9009;&#x62E9;&#x7B26;&#x548C;&#x5C5E;&#x6027;&#x503C;&#x5747;&#x9700;&#x4F7F;&#x7528;&#x53CC;&#x5F15;&#x53F7;&#xFF0C;&#x94FE;&#x63A5;&#x503C; <code>url()</code> &#x4E2D;&#x4E0D;&#x53EF;&#x4F7F;&#x7528;&#x53CC;&#x5F15;&#x53F7;&#x3002;</p>
<p><strong>&#x4E0D;&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token atrule"><span class="token rule">@import</span> <span class="token url">url(&quot;css/links.css&quot;)</span><span class="token punctuation">;</span></span>
<span class="token selector">html</span> <span class="token punctuation">{</span>
   <span class="token property">font-family</span><span class="token punctuation">:</span> <span class="token string">&apos;Open Sans&apos;</span>, arial, sans-serif<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><p><strong>&#x63A8;&#x8350;&#xFF1A;</strong></p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token atrule"><span class="token rule">@import</span> <span class="token url">url(css/links.css)</span><span class="token punctuation">;</span></span>
<span class="token selector">html</span> <span class="token punctuation">{</span>
   <span class="token property">font-family</span><span class="token punctuation">:</span> <span class="token string">&quot;Open Sans&quot;</span>, arial, sans-serif<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre>
      </div>
      <div class="md-sidebar-toc"><ul>
<li><a href="#%E5%89%8D%E7%AB%AF%E5%B7%A5%E7%A8%8B%E5%B8%88%E7%BA%B3%E7%B1%B3%E5%AD%A6%E4%BD%8D%E6%A0%B7%E5%BC%8F%E6%8C%87%E5%8D%97-css">&#x524D;&#x7AEF;&#x5DE5;&#x7A0B;&#x5E08;&#x7EB3;&#x7C73;&#x5B66;&#x4F4D;&#x6837;&#x5F0F;&#x6307;&#x5357; - CSS</a>
<ul>
<li><a href="#%E9%9B%B6-%E7%AE%80%E4%BB%8B">&#x96F6;. &#x7B80;&#x4ECB;</a></li>
<li><a href="#%E4%B8%80-%E9%80%9A%E7%94%A8%E8%A7%84%E5%88%99">&#x4E00;. &#x901A;&#x7528;&#x89C4;&#x5219;</a>
<ul>
<li><a href="#11-%E7%BC%96%E7%A0%81">1.1 &#x7F16;&#x7801;</a></li>
<li><a href="#12-%E5%AD%97%E6%AF%8D%E5%A4%A7%E5%B0%8F%E5%86%99">1.2 &#x5B57;&#x6BCD;&#x5927;&#x5C0F;&#x5199;</a></li>
<li><a href="#13-%E6%9C%AB%E5%B0%BE%E7%A9%BA%E6%A0%BC">1.3 &#x672B;&#x5C3E;&#x7A7A;&#x683C;</a></li>
<li><a href="#14-%E7%BC%A9%E8%BF%9B">1.4 &#x7F29;&#x8FDB;</a></li>
<li><a href="#15-%E6%B3%A8%E9%87%8A">1.5 &#x6CE8;&#x91CA;</a></li>
<li><a href="#16-%E5%8C%BA%E5%9D%97%E6%B3%A8%E9%87%8A">1.6 &#x533A;&#x5757;&#x6CE8;&#x91CA;</a></li>
<li><a href="#17-%E5%BE%85%E5%8A%9E%E4%BB%BB%E5%8A%A1">1.7 &#x5F85;&#x529E;&#x4EFB;&#x52A1;</a></li>
</ul>
</li>
<li><a href="#%E4%BA%8C-css-%E6%A0%B7%E5%BC%8F%E8%A7%84%E5%88%99">&#x4E8C;. CSS &#x6837;&#x5F0F;&#x89C4;&#x5219;</a>
<ul>
<li><a href="#21-id-%E5%92%8C-class-%E5%90%8D%E7%A7%B0">2.1 ID &#x548C; CLASS &#x540D;&#x79F0;</a></li>
<li><a href="#22-%E7%B1%BB%E5%9E%8B%E9%80%89%E6%8B%A9%E7%AC%A6">2.2 &#x7C7B;&#x578B;&#x9009;&#x62E9;&#x7B26;</a></li>
<li><a href="#23-%E7%AE%80%E5%86%99%E5%B1%9E%E6%80%A7">2.3 &#x7B80;&#x5199;&#x5C5E;&#x6027;</a></li>
<li><a href="#24-%E7%9C%81%E7%95%A50%E5%90%8E%E9%9D%A2%E7%9A%84%E5%8D%95%E4%BD%8D">2.4 &#x7701;&#x7565;0&#x540E;&#x9762;&#x7684;&#x5355;&#x4F4D;</a></li>
<li><a href="#25-%E5%89%8D%E5%AF%BC%E9%9B%B6">2.5 &#x524D;&#x5BFC;&#x96F6;</a></li>
<li><a href="#26-%E5%8D%81%E5%85%AD%E8%BF%9B%E5%88%B6%E8%A1%A8%E7%A4%BA%E6%B3%95">2.6 &#x5341;&#x516D;&#x8FDB;&#x5236;&#x8868;&#x793A;&#x6CD5;</a></li>
<li><a href="#27-id-%E5%92%8C-class-%E5%90%8D%E7%A7%B0%E5%88%86%E9%9A%94%E7%AC%A6">2.7 ID &#x548C; CLASS &#x540D;&#x79F0;&#x5206;&#x9694;&#x7B26;</a></li>
<li><a href="#28-hack">2.8 Hack</a></li>
</ul>
</li>
<li><a href="#%E4%B8%89-css-%E6%A0%BC%E5%BC%8F%E8%A7%84%E5%88%99">&#x4E09;. CSS &#x683C;&#x5F0F;&#x89C4;&#x5219;</a>
<ul>
<li><a href="#31-%E4%BB%A3%E7%A0%81%E5%9D%97%E5%86%85%E5%AE%B9%E7%BC%A9%E8%BF%9B">3.1 &#x4EE3;&#x7801;&#x5757;&#x5185;&#x5BB9;&#x7F29;&#x8FDB;</a></li>
<li><a href="#32-%E5%A3%B0%E6%98%8E%E6%A0%87%E7%82%B9">3.2 &#x58F0;&#x660E;&#x6807;&#x70B9;</a></li>
<li><a href="#33-%E5%B1%9E%E6%80%A7%E5%90%8D%E6%A0%87%E7%82%B9">3.3 &#x5C5E;&#x6027;&#x540D;&#x6807;&#x70B9;</a></li>
<li><a href="#34-%E5%A3%B0%E6%98%8E%E5%8C%BA%E6%A0%87%E7%82%B9">3.4 &#x58F0;&#x660E;&#x533A;&#x6807;&#x70B9;</a></li>
<li><a href="#35-%E9%80%89%E6%8B%A9%E7%AC%A6%E5%92%8C%E5%A3%B0%E6%98%8E%E5%88%86%E9%9A%94">3.5 &#x9009;&#x62E9;&#x7B26;&#x548C;&#x58F0;&#x660E;&#x5206;&#x9694;</a></li>
<li><a href="#36-%E8%A7%84%E5%88%99%E5%88%86%E9%9A%94">3.6 &#x89C4;&#x5219;&#x5206;&#x9694;</a></li>
<li><a href="#37-css-%E5%BC%95%E5%8F%B7">3.7 CSS &#x5F15;&#x53F7;</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
      <a id="sidebar-toc-btn">&#x2261;</a>
    
    
    
    
    
    
    
    
<script>
document.body.setAttribute('html-show-sidebar-toc', true)
var sidebarTOCBtn = document.getElementById('sidebar-toc-btn')
sidebarTOCBtn.addEventListener('click', function(event) {
  event.stopPropagation()
  if (document.body.hasAttribute('html-show-sidebar-toc')) {
    document.body.removeAttribute('html-show-sidebar-toc')
  } else {
    document.body.setAttribute('html-show-sidebar-toc', true)
  }
})
</script>
      
  
    </body></html>